package com.hengyue.controller.asset;

import com.hengyue.annotation.Log;
import com.hengyue.asset.domain.criterial.AssetCriteria;
import com.hengyue.asset.domain.entity.Asset;
import com.hengyue.asset.service.IAssetService;
import com.hengyue.common.core.page.TableDataInfo;
import com.hengyue.controller.base.BaseController;
import com.hengyue.enums.BusinessType;
import jakarta.servlet.http.HttpServletResponse;
import lombok.RequiredArgsConstructor;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@SuppressWarnings("all")
@RequestMapping("/asset")
@RequiredArgsConstructor
public class AssetController extends BaseController {

    private final IAssetService assetService;

    @PreAuthorize("@ss.hasPermi('asset:list')")
    @GetMapping("/list")
    public TableDataInfo getList(AssetCriteria criteria) {
        return assetService.getList(criteria);
    }
    @Log(title = "资产列表", businessType = BusinessType.EXPORT)
    @PreAuthorize("@ss.hasPermi('system:post:export')")
    @PostMapping("/export")
    public void export(HttpServletResponse response,  Asset asset)
    {
        /*List<SysPost> list = postService.selectPostList(post);
        ExcelUtil<SysPost> util = new ExcelUtil<SysPost>(SysPost.class);
        util.exportExcel(response, list, "岗位数据");*/
    }






}
